[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 <<                      Bitwise Shift Left

 exp1 << exp2            Bitwise shift left
 exp1                    any integer value
 exp2                    any integer value; treated as unsigned

    The << operator returns exp1 shifted to the left by exp2 bits, with
    the vacated righthand bits filled with zeros.  For example:

           j = 0x0F71;
           i = j << 4;          /* i == 0xF710 */

    In C++, the << operator has been overloaded to pass data to a
    stream, as in cout << my_data. It is referred to as the insertion
    operator.

       Note:    The << operator does not alter exp1.


See Also: >>
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson